package br.com.view;
import java.awt.Color;
import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.font.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.*;

public class Pratica extends JFrame{
	JButton botaoSoma,botaoSub,botaoMult,botaoDiv,botaoIgual,bt1,bt2,bt3,bt4,bt5,bt6,bt7,bt8,bt9,bt0;
	JTextField campoDeTexto;
	ImageIcon icone1,icone2,icone3,icone4,icone5;
	public Pratica(){
		botaoSoma = new JButton("+");
		botaoSub = new JButton("-");
		botaoMult = new JButton("*");
		botaoDiv = new JButton("/");
		botaoIgual = new JButton("=");
		bt1 = new JButton("1");
		bt2 = new JButton("2");
		bt3 = new JButton("3");
		bt4 = new JButton("4");
		bt5 = new JButton("5");
		bt6 = new JButton("6");
		bt7 = new JButton("7");
		bt8 = new JButton("8");
		bt9 = new JButton("9");
		bt0 = new JButton("0");
		 
		
		campoDeTexto = new JTextField(10);
		
//		botao1.setBounds(0,10,50,50);
//		botao2.setBounds(50,10,50,50);
//		botao3.setBounds(100,10,50,50);
//		botao4.setBounds(150,10,50,50);
//		botao5.setBounds(200,10,50,50);
		
		this.setBounds(100,100,220,200);
		this.setLayout(new GridLayout(4,4));
		this.setResizable(true);
		
		
		Container tela = getContentPane();
		
		tela.add(campoDeTexto);
		
		
		Container botoes = getContentPane();
		botoes.setBackground(new Color(50,100,100,100));
		botoes.add(botaoSoma);
		botoes.add(botaoSub);
		botoes.add(botaoMult);
		botoes.add(botaoDiv);
		botoes.add(botaoIgual);
		botoes.add(bt0);
		botoes.add(bt1);
		botoes.add(bt2);
		botoes.add(bt3);
		botoes.add(bt4);
		botoes.add(bt5);
		botoes.add(bt6);
		botoes.add(bt7);
		botoes.add(bt8);
		botoes.add(bt9);
		
		
		setTitle("Calculadora");
		
		
		
	}
	public static void main (String []args){
		Pratica tela = new Pratica();
		tela.setVisible(true);
	}
	
}